home *** CD-ROM | disk | FTP | other *** search
- Path: surfnet.nl!sun4nl!ittpub!ittpub!nntp
- Newsgroups: comp.lang.c++
- Subject: Re: Is this a memory leak?
- Message-ID: <1996Apr12.134122.1834@ittpub>
- From: wil@ittpub.nl (Wil Evers)
- Date: 12 Apr 96 13:41:22 WET
- References: <316ABE12.1915@delta.com>
- Distribution: world
- Nntp-Posting-Host: lintilla
-
- In article <316ABE12.1915@delta.com> Sean Palmer <sean@delta.com> writes:
- > > Also, many prominent people involved in C++, among them Bjarne
- > > Stroustrup, the language's designer, recommend using 0, not NULL,
- > > as a null pointer. One of the arguments against NULL is that it is not
- > > as portable as 0; some people might spell it 'Null', or 'null'.
- >
- > Sounds like an argument against case sensitivity to me....
-
- The real reason C++ programmers prefer plain `0' over `NULL' is that some
- C header files define `NULL' as `(void *) 0'. In C, it is legal to assign
- a void * to any other pointer type, while in C++ that requires a cast.
- However, in both languages, it is legal to assign the integer constant `0'
- (or even `1 - 1') to any pointer.
-
- - Wil
-
-